feat(fs): read SQLite databases through the one read path - #20
Conversation
A database file — recognized by its 16-byte magic header, never its extension — renders as a schema overview: each table with its columns and row count. An optional `query` runs SQL against it, rows as TSV capped at 200 with the true total reported. Read-only is enforced by the engine, not by string inspection: the connection opens `mode=ro` with `query_only` on, so a write fails inside SQLite however it is spelled. A database another process is writing (live WAL) falls back to the `immutable=1` open bullpen's own docs recommend for inspecting its store — which is the point: an agent can now inspect bullpen's coordination plane with its own read tool. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KoSjfcJPjXpkVLTS2Vxwwr
|
Warning Review limit reached
Next review available in: 38 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Continues the
readdecoder series fromdocs/TOOLS.md(files → directories → URLs → now SQLite).read_fileon a SQLite database — recognized by its 16-byte magic header, never its extension — renders a schema overview: each table with its columns and row count. An optionalqueryinput runs SQL against it, rows rendered as TSV, capped at 200 with the true total reported.Two design points worth review:
mode=rowithPRAGMA query_only=ON, so a write fails inside SQLite however it's spelled — the test matrix includesINSERT,DELETE,DROP, and a comment-prefixedUPDATE, all rejected with the file unchanged.immutable=1, the same open bullpen's README recommends for inspecting its store while sessions run. That's the point of the feature: an agent can now inspect bullpen's own coordination plane (sessions, todos, records) with its own read tool.Validation: schema overview, TSV rendering and row caps, magic-based detection (a text file named
.dbis read as text), engine-level write rejection, bad-SQL errors, plus an integration test throughread_fileitself. Full gates green — fmt, clippy-D warnings, workspace tests ×2 (194 tests).🤖 Generated with Claude Code
https://claude.ai/code/session_01KoSjfcJPjXpkVLTS2Vxwwr
Generated by Claude Code